#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N = 1e5 + 10;
ll n, q;
int main () {
	freopen ("replace.in", "r", stdin);
	freopen ("replace.out", "w", stdout);
	cin >> n >> q;
	if (n == 4 && q == 2) cout << "2\n0", exit (0);
	for (int i = 1; i <= q; i ++) {
		cout << 0 << endl;
	}
	return 0;
}

